package cn.com.util;

import com.qiniu.util.Auth;
import com.qiniu.util.StringMap;

public class qiniuUtil {
    private static final String accessKey="K2EGgResx-IhMz-nJNufcrrVDsaOopmDgS4bK9HB";
    private static final String sercetKey="fbR0zpHoMNFIUvNMDep5c_6ULtCB_yvqwUTw7wqH";
    private static final String bucket="birthcaker"; //七牛云里的空间名
    private static  Auth auth=null;

    static{
        auth=Auth.create(accessKey,sercetKey);
    }

    public static String getUpToken(){
        String upToken=auth.uploadToken(bucket);
        return upToken;
    }

    public static String getDefaultCoverUpToken(String fileKey){
        return auth.uploadToken(bucket,fileKey);
    }



}
